<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head >
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
  <meta name="description" content="">
  <meta name="author" content="ThemeBucket">
  <link rel="shortcut icon" href="#" type="image/png">

  <title>Dynamic Table</title>

  <!--dynamic table-->
  <link href="js/advanced-datatable/css/demo_page.css" rel="stylesheet" />
  <link href="js/advanced-datatable/css/demo_table.css" rel="stylesheet" />
  <link rel="stylesheet" href="js/data-tables/DT_bootstrap.css" />

  <link href="css/style.css" rel="stylesheet">
  <link href="css/style-responsive.css" rel="stylesheet">

  <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!--[if lt IE 9]>
  <script src="js/html5shiv.js"></script>
  <script src="js/respond.min.js"></script>
  <![endif]-->
</head>

<body class="sticky-header">

<section>
    <!-- left side start-->
    <div th:replace="common :: #leftMenu"></div>
    <!-- left side end-->
    
    <!-- main content start-->
    <div class="main-content" >

        <div th:replace="common :: #headerMenu"></div>

        <!-- page heading start-->
        <div class="page-heading">
            <h3>
                Dynamic Table
            </h3>
            <ul class="breadcrumb">
                <li>
                    <a href="#">Dashboard</a>
                </li>
                <li>
                    <a href="#">Data Tables</a>
                </li>
                <li class="active"> Dynamic Table </li>
            </ul>
        </div>
        <!-- page heading end-->

        <!--body wrapper start-->
        <div class="wrapper">
        <div class="row">
        <div class="col-sm-12">
        <section class="panel">
        <header class="panel-heading">
            Dynamic Table
            <span class="tools pull-right">
                <a href="javascript:;" class="fa fa-chevron-down"></a>
                <a href="javascript:;" class="fa fa-times"></a>
             </span>
        </header>
        <div class="panel-body">
        <div class="adv-table">
        <table  class="display table table-bordered table-striped" id="dynamic-table">

        <thead>
        <tr>
            <th>#</th>
            <th>id</th>
            <th>name</th>
            <th class="hidden-phone">age</th>
            <th class="hidden-phone">email</th>
        </tr>
        </thead>

        <tbody role="alert" aria-live="polite" aria-relevant="all">
            <tfoot>
        <tr class="gradeX odd" th:each="login,stat:${page.records}">
            <td th:text="${stat.count}">Trident</td>
            <td th:text="${login.id}">id</td>
            <td th:text="${login.name}">Win 95+</td>
            <td class="center hidden-phone" th:text="${login.age}">4</td>
            <td class="center hidden-phone" >[[${login.email}]]</td>
            <td class="center hidden-phone sorting_1" >
                <a th:href="@{/user/delete/{id}(id=${login.id},pn=${page.current})}" class="btn btn-danger btn-sm" type="button">删除</a>
            </td>
        </tr>
            </tfoot>
        </tbody>
        </table>
        <div class="row-fluid">
            <div class="span6">
                <div class="dataTables_info" id="dynamic-table_info">
                    当前第[[${page.current}]]页  总计[[${page.pages}]]页 共[[${page.total}]]条数据
                </div>
            </div>
            <div class="span6">
                <div class="dataTables_paginate paging_bootstrap pagination">
                    <ul>
                        <li class="prev disabled" ><a href="#">上一页</a> </li>
                        <li th:class="${num == page.current?'active':''}" th:each="num:${#numbers.sequence(1,page.pages)}">
                            <a th:href="@{/dynamic_table(pn=${num})}">[[${num}]]</a>
                        </li>
                        <li class="next disabled" ><a href="#">下一页</a> </li>
                    </ul>
                </div>
            </div>
        </div>
        </div>
        </div>
        </section>
        </div>
        </div>
        <div class="row">
        <div class="col-sm-12">
        <section class="panel">
        <header class="panel-heading">
            DataTables hidden row details example
            <span class="tools pull-right">
                <a href="javascript:;" class="fa fa-chevron-down"></a>
                <a href="javascript:;" class="fa fa-times"></a>
             </span>
        </header>
        <div class="panel-body">
        <div class="adv-table">
        <table class="display table table-bordered" id="hidden-table-info">
        <thead>
        <tr>
            <th>#</th>
            <th class="hidden-phone">用户名</th>
            <th class="hidden-phone">密码</th>
        </tr>
        </thead>
        <tbody>
        <tr class="gradeX" th:each="user,stats:${users}">
            <td th:text="${stats.count}">Trident</td>
<!--            <td>Internet-->
<!--                Explorer 4.0</td>-->
<!--            <td class="hidden-phone">Win 95+</td>-->
            <td th:text="${user.username}" class="center hidden-phone">4</td>
            <td class="center hidden-phone">[[${user.password}]]</td>
        </tr>
        </tbody>
        </table>

        </div>
        </div>
        </section>
        </div>
        </div>
        </div>
        <!--body wrapper end-->

        <!--footer section start-->
        <footer>
            2014 &copy; AdminEx by ThemeBucket
        </footer>
        <!--footer section end-->


    </div>
    <!-- main content end-->
</section>

<!--dynamic table-->
<script type="text/javascript" language="javascript" src="js/advanced-datatable/js/jquery.dataTables.js"></script>
<script type="text/javascript" src="js/data-tables/DT_bootstrap.js"></script>
<!--dynamic table initialization -->
<script src="js/dynamic_table_init.js"></script>

<div th:include="common :: #commonScript"></div>
</body>
</html>
